<?php
yii::app()->user->hasFlash('contact');
echo Yii::app()->user->getFlash('contact');
?>
<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
            <thead>
            <tr>
                <th>id</th>
                <th>Tựa đề</th>
                <th>Nội Dung</th>
                <th>Picture</th>
                <th>Danh Mục</th>
                <th>Thời gian</th>
                <th>Người đăng</th>
                <th>Theo dõi</th>
                <th>trạng thái</th>
                <th>Sửa</th>
                <th>Xóa</th>
            </tr>
            </thead>
            <tbody>
            <?php
            foreach($listnote as $key=>$value){
                ?>
                <tr>
                    <th><?php echo $value->id?></th>
                    <th><?php echo $value->title?></th>
                    <th style="height: 300px"><?php echo $value->subtitle?></th>
                    <th style="height: 300px"><img style="width: 50px" src="<?php echo $value->images?>"></th>
                    <th><?php echo Category::GetMenu($value->category_id) ?></th>
                    <th><?php echo $value->updatetime?></th>
                    <th><?php echo Admin::GetAdmin($value->admin_id) ?></th>
                    <th><?php echo $value->view ?></th>
                    <th><?php echo $value->status?></th>
                    <th><a href="<?php echo Yii::app()->createUrl('admin/note/preupdatenote',array('id'=>$value->id))?>"onclick="return confirm('bạn có muốn sửa không');">Sửa</a></th>
                    <th><a href="<?php echo Yii::app()->createUrl('admin/note/deletenote',array('id'=>$value->id))?>"onclick="return confirm('bạn có muốn xóa không');">Xóa</a></th>
                </tr>
            <?php }?>
            </tbody>
        </table>
        <nav>
            <ul class="pagination">
                <?php for($i =0;$i<$sumpage;$i++){?>
                <li><a href="index.php?r=admin/product/listproduct&pageid=<?php echo $i;?>"><?php echo $i+1 ?></a></li>
                <?php }?>
            </ul>
        </nav>
    </div>
</div>